package hongcaosp.app.android.modle.impl;

import com.lzy.okgo.OkGo;
import com.lzy.okgo.model.HttpParams;

import hongcaosp.app.android.BuildConfig;
import hongcaosp.app.android.modle.BaseResponse;
import hongcaosp.app.android.modle.DataCallBack;
import hongcaosp.app.android.modle.mi.UserLikeModle;

public class UserLikeModleImpl implements UserLikeModle {
    @Override
    public void add(String token, int id, DataCallBack callBack) {
        HttpParams params = new HttpParams();
        params.put("token", token);
        params.put("id", id);
        OkGo.<BaseResponse>post(BuildConfig.HOST + "/api/userLike/add").params(params).execute(callBack);
    }

    @Override
    public void cancel(String token, int id, DataCallBack callBack) {
        HttpParams params = new HttpParams();
        params.put("token", token);
        params.put("id", id);
        OkGo.<BaseResponse>post(BuildConfig.HOST + "/api/userLike/cancel").params(params).execute(callBack);
    }
}
